apply plugin: 'com.android.application'

android {
    compileSdkVersion 30
    buildToolsVersion "30.0.1"

    defaultConfig {
        applicationId "com.example.uhf"
        minSdkVersion 19
        targetSdkVersion 29
        versionCode 1
        versionName "1.3.4"
    }

    signingConfigs {
        debug {
            File strFile = new File("/uhf-serial_release.jks")
            storeFile file(strFile)
            storePassword "123456"
            keyPassword "123456"
            keyAlias "uhf-serial-key"
        }
        release {
            File strFile = new File("/uhf-serial_release.jks")
            storeFile file(strFile)
            storePassword "123456"
            keyPassword "123456"
            keyAlias "uhf-serial-key"
        }
    }

    buildTypes {
        release {
            signingConfig signingConfigs.release
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }

        // 自定义apk名称
        android.applicationVariants.all { variant ->
            variant.outputs.all {
                outputFileName = "UHF-serial_v${defaultConfig.versionName}.apk"
            }
        }
    }

    lintOptions {
        checkReleaseBuilds false
        abortOnError false
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.*'])
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
}
